# todo 多个数字相加
# def add(*nums):
#     sum = 0
#     for i in nums:
#         sum = sum + i
#     return sum
#
#
# a = add(1, 2, 3, 4, 5, 6, 7, 8, 9)
# print(a)


#  不定长关键字参数
# def info(name,age,**kwargs):
#     print(f"我的姓名：{name}")
#     print(f"我的年龄:{age}")
#     print(f"其他信息:性别:{kwargs['sex']},爱好:{kwargs['hobby']}")
#
# info("张飞","18",sex="男",hobby="买肉")

#todo 按照顺序来定义参数，必填参数，位置不定长参数，默认参数，关键字不定长参数
def fn(a,b,*args,c=10,**kwargs):
    print(a)
    print(b)
    print(args)
    print(kwargs)
    print(c)

fn(1,2,3,4,d="10",g="20")